﻿using UnityEngine;
using System.Collections;

public class EnemyState : MonoBehaviour {

	public EnemyTrigger[] trigger;
	public EnemyRaycast[] ray;


	

	void Update () {
		for(short i = 0; i < trigger.Length; i++){
			if(trigger[i].canShoot)
				for(short j = 0; j < trigger.Length; j++)
					ray[j].enabled = false;
			return;
		}
		for(short i = 0; i < trigger.Length; i++)
			ray[i].enabled = true;
	}
}
